<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增活动信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form" th:object="${appraise}">
            <div class="form-group">
                <label class="col-sm-3 control-label">参与时长：</label>
                <div class="col-sm-8">
                    <input name="appraiseTime" class="form-control" th:field="*{appraiseTime}" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">活动表现：</label>
                <div class="col-sm-8" id="star">
                    <span class="glyphicon glyphicon-star-empty"></span>
                    <span class="glyphicon glyphicon-star-empty"></span>
                    <span class="glyphicon glyphicon-star-empty"></span>
                    <span class="glyphicon glyphicon-star-empty"></span>
                    <span class="glyphicon glyphicon-star-empty"></span>
                    <input name="appraiseScore" id="appraiseScore" th:field="*{appraiseScore}" type="hidden">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">评价内容：</label>
                <div class="col-sm-8">
                    <textarea name="appraiseContent" class="form-control" readonly>[[*{appraiseContent}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "vtsp/appraise"
        $("#form").validate({
            focusCleanup: true
        });

        function submitHandler() {
            $.modal.close()
        }

        let score = $('#appraiseScore').val();
        $($('.glyphicon')[parseInt(score)]).addClass('glyphicon-star').removeClass('glyphicon-star-empty').prevAll('.glyphicon').addClass('glyphicon-star').removeClass('glyphicon-star-empty');


    </script>
</body>
</html>
